package gx.dao.impl.common;

import java.util.List;

import org.springframework.stereotype.Repository;

import gx.dao.NewsDao;
import gx.entity.News;
import gx.entity.common.Page;

@Repository
public class NewsDaoImpl extends BaseDaoImpl<News> implements NewsDao {
//public List<News> findByName(String title){
//	return find("from News where title like ?","%"+title+"%");
//}

@Override
public List<News> findNews(Integer news_cate) {
	return find("from News where news_cate=?",news_cate);
}

@Override
public Page<News> findByName(int size, int number, String condition) {

	return find(size,number,"from News where title like ?","%"+condition+"%");
}


	

}
